export default class jingdutiao1 extends Laya.Script {
    // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    owner=this.owner as Laya.Sprite;
    isplay=false;
    
    constructor() { super(); }
    onAwake(){
            Laya.stage.on("start",this,function(){this.owner.value=0;})
            Laya.stage.on("homepege",this,function(){this.visible=false})
            Laya.stage.on("gamer2",this,this.gamer2)
            Laya.stage.on("+",this,this.zhen);
    }
    gamer2(){
        this.owner.visible=true;
        this.owner.value=0;
        this.isplay=true;
    }
    zhen()
    {
        if(this.isplay){
             if (this.owner.value < 1)
            this.owner.value += 0.025;
            else if(this.owner.value == 1){
            Laya.stage.event("victory");
            this.owner.visible=false;
            this.isplay=false;
    }
        }
   
    }
    }
    